
/***** target and surround offsets *******/
static int TargetIndex[][256] = 
{
  /* Template 0 */
  {269,270,271,272,273,300,301,302,303,304,305,306,307,332,333,334,335,336,337,338,339,362,363,364,365,366,367,368,369,370,371,372,395,396,397,398,399,400,401,402,403,404,427,428,429,430,431,432,433,434,435,436,459,460,461,462,463,464,465,466,467,468,491,492,493,494,495,496,497,498,499,500,523,524,525,526,527,528,529,530,531,532,555,556,557,558,559,560,561,562,563,564,587,588,589,590,591,592,593,594,595,619,620,621,622,623,624,625,626,627,651,652,653,654,655,656,657,658,659,683,684,685,686,687,688,689,690,691,718,719,720,721,751},
  /* Template 1 */
  {270,271,272,273,274,302,303,304,305,306,307,332,333,334,335,336,337,338,339,363,364,365,366,367,368,369,370,371,394,395,396,397,398,399,400,401,402,403,427,428,429,430,431,432,433,434,435,436,459,460,461,462,463,464,465,466,467,468,491,492,493,494,495,496,497,498,499,500,523,524,525,526,527,528,529,530,531,555,556,557,558,559,560,561,562,563,587,588,589,590,591,592,593,594,595,619,620,621,622,623,624,625,626,627,651,652,653,654,655,656,657,658,659,682,683,684,685,686,687,688,689,690,691,714,715,717,718,719,720,721,722,723},
  /* Template 2 */
  {270,271,272,273,274,275,301,302,303,304,305,306,307,308,333,334,335,336,337,338,339,340,364,365,366,367,368,369,370,371,372,395,396,397,398,399,400,401,402,403,427,428,429,430,431,432,433,434,435,436,460,461,462,463,464,465,466,467,492,493,494,495,496,497,498,499,523,524,525,526,527,528,529,530,531,554,555,556,557,558,559,560,561,562,563,586,587,588,589,590,591,592,593,594,595,618,619,620,621,622,623,624,625,626,650,651,652,653,654,655,656,657,658,682,683,684,685,686,687,688,689,690,718,719,720,721,722,753,754},
  /* Template 3 */
  {271,272,273,274,302,303,304,305,306,307,308,333,334,335,336,337,338,339,340,365,366,367,368,369,370,371,372,397,398,399,400,401,402,403,404,428,429,430,431,432,433,434,435,436,460,461,462,463,464,465,466,467,468,492,493,494,495,496,497,498,499,523,524,525,526,527,528,529,530,554,555,556,557,558,559,560,561,562,586,587,588,589,590,591,592,593,594,618,619,620,621,622,623,624,625,626,650,651,652,653,654,655,656,657,658,682,683,684,685,686,687,688,689,718,719,720,721,722,752,753},
  /* Template 4 */
  {273,274,275,302,303,304,305,306,307,308,309,333,334,335,336,337,338,339,340,341,365,366,367,368,369,370,371,372,373,396,397,398,399,400,401,402,403,404,405,428,429,430,431,432,433,434,435,436,437,460,461,462,463,464,465,466,467,468,492,493,494,495,496,497,498,499,500,524,525,526,527,528,529,530,531,554,555,556,557,558,559,560,561,562,563,585,586,587,588,589,590,591,592,593,594,617,618,619,620,621,622,623,624,625,626,649,650,651,652,653,654,655,656,657,658,683,684,685,686,687,688,689,718,719,720,721,722,752,753},
  /* Template 5 */
  {240,241,242,271,272,273,274,302,303,304,305,306,307,308,334,335,336,337,338,339,340,341,365,366,367,368,369,370,371,372,373,396,397,398,399,400,401,402,403,404,405,428,429,430,431,432,433,434,435,436,437,438,460,461,462,463,464,465,466,467,468,469,492,493,494,495,496,497,498,499,500,523,524,525,526,527,528,529,530,531,553,554,555,556,557,558,559,560,561,562,563,585,586,587,588,589,590,591,592,593,594,617,618,619,620,621,622,623,624,625,626,649,650,651,652,653,654,655,656,657,658,683,684,685,686,687,688,717,718,719,720,721,751,752,753},
  /* Template 6 */
  {273,274,302,303,304,305,306,307,333,334,335,336,337,338,339,364,365,366,367,368,369,370,371,372,373,396,397,398,399,400,401,402,403,404,405,406,428,429,430,431,432,433,434,435,436,437,438,459,460,461,462,463,464,465,466,467,468,469,470,491,492,493,494,495,496,497,498,499,500,501,522,523,524,525,526,527,528,529,530,531,553,554,555,556,557,558,559,560,561,562,563,583,584,585,586,587,588,589,590,591,592,593,594,615,616,617,618,619,620,621,622,623,624,625,626,647,648,649,650,651,652,653,654,655,656,657,683,684,685,686,687,688,716,717,718,719,720,750,751,752,782,783},
  /* Template 7 */
  {274,302,303,304,305,306,307,332,333,334,335,336,337,338,339,340,364,365,366,367,368,369,370,371,372,373,396,397,398,399,400,401,402,403,404,405,427,428,429,430,431,432,433,434,435,436,437,438,459,460,461,462,463,464,465,466,467,468,469,470,471,491,492,493,494,495,496,497,498,499,500,501,502,521,522,523,524,525,526,527,528,529,530,531,532,551,552,553,554,555,556,557,558,559,560,561,562,563,582,583,584,585,586,587,588,589,590,591,592,593,594,615,616,617,618,619,620,621,622,623,624,625,626,650,651,652,653,654,655,656,657,683,684,685,686,687,688,716,717,718,719,749,750,751,781,782},
  /* Template 8 */
  {303,304,305,306,334,335,336,337,338,339,365,366,367,368,369,370,371,372,373,396,397,398,399,400,401,402,403,404,405,427,428,429,430,431,432,433,434,435,436,437,459,460,461,462,463,464,465,466,467,468,469,490,491,492,493,494,495,496,497,498,499,500,501,502,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,551,552,553,554,555,556,557,558,559,560,561,562,563,564,583,584,585,586,587,588,589,590,591,592,593,594,595,615,616,617,618,619,620,621,622,623,624,625,626,650,651,652,653,654,655,656,683,684,685,686,687,688,715,716,717,718,719,749,750},
  /* Template 9 */
  {271,272,303,304,305,306,334,335,336,337,338,339,365,366,367,368,369,370,371,397,398,399,400,401,402,403,404,405,427,428,429,430,431,432,433,434,435,436,437,438,459,460,461,462,463,464,465,466,467,468,469,470,471,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,551,552,553,554,555,556,557,558,559,560,561,562,563,564,583,584,585,586,587,588,589,590,591,592,593,594,595,616,617,618,619,620,621,622,623,624,625,626,649,650,651,652,653,654,655,656,682,683,684,685,686,687,688,715,716,717,718,749},
  /* Template 10 */
  {304,305,306,307,334,335,336,337,338,339,365,366,367,368,369,370,371,397,398,399,400,401,402,403,404,427,428,429,430,431,432,433,434,435,436,437,438,458,459,460,461,462,463,464,465,466,467,468,469,470,471,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,583,584,585,586,587,588,589,590,591,592,593,594,595,616,617,618,619,620,621,622,623,624,625,626,649,650,651,652,653,654,655,656,682,683,684,685,686,687,714,715,716,717,718,747,748,749},
  /* Template 11 */
  {304,305,306,334,335,336,337,338,339,366,367,368,369,370,371,397,398,399,400,401,402,403,404,428,429,430,431,432,433,434,435,436,437,458,459,460,461,462,463,464,465,466,467,468,469,470,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,584,585,586,587,588,589,590,591,592,593,594,595,596,616,617,618,619,620,621,622,623,624,625,649,650,651,652,653,654,655,656,682,683,684,685,686,714,715,716,717,747,748},
  /* Template 12 */
  {306,335,336,337,338,339,366,367,368,369,370,371,397,398,399,400,401,402,403,404,429,430,431,432,433,434,435,436,437,438,457,458,459,460,461,462,463,464,465,466,467,468,469,470,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,584,585,586,587,588,589,590,591,592,593,594,595,596,617,618,619,620,621,622,623,624,625,626,650,651,652,653,654,655,656,682,683,684,685,686,714,715,716,717},
  /* Template 13 */
  {334,335,336,337,338,339,340,365,366,367,368,369,370,371,372,397,398,399,400,401,402,403,404,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,584,585,586,587,588,589,590,591,592,593,594,595,596,597,617,618,619,620,621,622,623,624,625,626,649,650,651,652,653,654,655,656,682,683,684,685,686,714,715},
  /* Template 14 */
  {334,335,336,337,338,339,365,366,367,368,369,370,371,372,391,392,394,395,396,397,398,399,400,401,402,403,404,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,584,585,586,587,588,589,590,591,592,593,594,595,596,597,617,618,619,620,621,622,623,624,625,626,627,649,650,651,652,653,654,655,656,681,682,683,684,685,686},
  /* Template 15 */
  {334,335,336,337,338,339,365,366,367,368,369,370,371,372,391,392,393,394,395,396,397,398,399,400,401,402,403,404,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,617,618,619,620,621,622,623,624,625,626,627,628,629,649,650,651,652,653,654,655,656,681,682,683,684,685,714},
  /* Template 16 */
  {334,335,336,337,338,339,360,362,363,364,365,366,367,368,369,370,371,372,391,392,393,394,395,396,397,398,399,400,401,402,403,404,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,616,617,618,619,620,621,622,623,624,625,626,627,628,629,648,649,650,651,652,653,654,655,656,658,680,681,682,683},
  /* Template 17 */
  {333,334,335,336,339,359,360,361,362,363,364,365,366,367,368,369,370,371,372,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,648,649,650,651,652,653,654,655,656,657,658,659,660,680,681,682},
  /* Template 18 */
  {360,361,362,363,364,365,366,367,368,369,370,371,372,373,392,393,394,395,396,397,398,399,400,401,402,403,404,405,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,648,649,650,651,652,653,654,655,656,657,658,659,660,661,685},
  /* Template 19 */
  {329,330,331,332,333,360,361,362,363,364,365,366,367,368,369,370,371,372,393,394,395,396,397,398,399,400,401,402,403,404,405,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,649,652,653,654,655,656,657,658,659,660,661,687},
  /* Template 20 */
  {329,330,331,332,333,334,361,362,363,364,365,366,367,368,369,370,371,393,394,395,396,397,398,399,400,401,402,403,425,426,427,428,429,430,431,432,433,434,435,436,437,438,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,654,655,656,657,658,659,660,661,692},
  /* Template 21 */
  {267,298,299,300,301,302,329,330,331,332,333,334,361,362,363,364,365,366,367,368,369,393,394,395,396,397,398,399,400,401,402,403,405,424,425,426,427,428,429,430,431,432,433,434,435,436,437,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,620,621,622,623,624,625,626,627,628,629,630,631,655,656,657,658,659,660,661,662,690,691,692},
  /* Template 22 */
  {266,297,298,299,300,301,302,303,329,330,331,332,333,334,361,362,363,364,365,366,367,368,369,370,392,393,394,395,396,397,398,399,400,401,402,403,404,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,620,621,622,623,624,625,626,627,628,629,630,654,655,656,657,658,659,660,661,662,690,691,692},
  /* Template 23 */
  {234,265,266,267,297,298,299,300,301,302,329,330,331,332,333,334,335,361,362,363,364,365,366,367,368,369,370,393,394,395,396,397,398,399,400,401,402,403,423,424,425,426,427,428,429,430,431,432,433,434,435,436,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,586,587,588,589,590,591,592,593,594,595,596,597,598,599,621,622,623,624,625,626,627,628,629,630,631,655,656,657,658,659,660,661,662,689,690,691,692,693,723},
  /* Template 24 */
  {267,299,300,301,329,330,331,332,333,334,335,362,363,364,365,366,367,368,393,394,395,396,397,398,399,400,401,424,425,426,427,428,429,430,431,432,433,434,435,456,457,458,459,460,461,462,463,464,465,466,467,468,469,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,588,589,590,591,592,593,594,595,596,597,598,599,600,621,622,623,624,625,626,627,628,629,630,631,632,655,656,657,658,659,660,661,662,689,690,691,692,693,722,723,724},
  /* Template 25 */
  {269,299,301,302,331,332,333,334,335,362,363,364,365,366,367,368,392,393,394,395,396,397,398,399,400,401,424,425,426,427,428,429,430,431,432,433,434,435,455,456,457,458,459,460,461,462,463,464,465,466,467,468,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,555,556,557,558,559,560,561,562,563,564,565,566,588,589,590,591,592,593,594,595,596,597,598,599,622,623,624,625,626,627,628,629,630,655,656,657,658,659,660,661,662,689,690,691,692,693,722,723},
  /* Template 26 */
  {237,238,269,270,298,299,300,301,302,330,331,332,333,334,335,361,362,363,364,365,366,367,392,393,394,395,396,397,398,399,400,423,424,425,426,427,428,429,430,431,432,433,434,455,456,457,458,459,460,461,462,463,464,465,466,467,468,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,554,555,556,557,558,559,560,561,562,563,564,565,566,588,589,590,591,592,593,594,595,596,597,598,621,622,623,624,625,626,627,628,629,630,655,656,657,658,659,660,661,662,688,689,690,691,692,693,722,723},
  /* Template 27 */
  {238,268,269,270,298,299,300,301,302,303,329,330,331,332,333,334,335,359,361,362,363,364,365,366,367,368,391,392,393,394,395,396,397,398,399,400,401,423,424,425,426,427,428,429,430,431,432,433,434,456,457,458,459,460,461,462,463,464,465,466,467,488,489,490,491,492,493,494,495,496,497,498,499,500,523,524,525,526,527,528,529,530,531,532,533,534,554,555,556,557,558,559,560,561,562,563,564,565,566,589,590,591,592,593,594,595,596,597,598,621,622,623,624,625,626,627,628,629,630,654,655,656,657,658,659,660,661,662,688,689,690,691,692,693,694,721,722,723,724},
  /* Template 28 */
  {266,267,268,269,270,271,298,299,300,301,302,303,329,330,331,332,333,334,335,361,362,363,364,365,366,367,368,391,392,393,394,395,396,397,398,399,400,401,423,424,425,426,427,428,429,430,431,432,433,434,455,456,457,458,459,460,461,462,463,464,465,466,467,468,490,491,492,493,494,495,496,497,498,499,500,503,522,523,524,525,526,527,528,529,530,531,532,533,534,535,556,557,558,559,560,561,562,563,564,565,566,567,589,590,591,592,593,594,595,596,597,598,599,621,622,623,624,625,626,627,628,629,630,654,655,656,657,658,659,660,661,662,687,688,689,690,691,692,693,694,720,721,722,723,724},
  /* Template 29 */
  {269,270,271,297,298,299,300,301,302,303,329,330,331,332,333,334,335,360,361,362,363,364,365,366,367,368,392,393,394,395,396,397,398,399,400,424,425,426,427,428,429,430,431,432,433,434,458,459,460,461,462,463,464,465,466,467,491,492,493,494,495,496,497,498,499,523,524,525,526,527,528,529,530,531,532,533,534,535,556,557,558,559,560,561,562,563,564,565,566,567,589,590,591,592,593,594,595,596,597,598,599,621,622,623,624,625,626,627,628,629,630,654,655,656,657,658,659,660,661,662,687,688,689,690,691,692,693,720,721,722,723,724},
  /* Template 30 */
  {237,269,270,271,297,298,299,300,301,302,303,304,328,329,330,331,332,333,334,335,360,361,362,363,364,365,366,367,393,394,395,396,397,398,399,400,425,426,427,428,429,430,431,432,459,460,461,462,463,464,465,466,467,491,492,493,494,495,496,497,498,499,500,524,525,526,527,528,529,530,531,532,533,556,557,558,559,560,561,562,563,564,565,566,589,590,591,592,593,594,595,596,597,598,621,622,623,624,625,626,627,628,629,630,654,655,656,657,658,659,660,661,687,688,689,690,691,692,693,720,721,722,723,724},
  /* Template 31 */
  {206,238,239,269,270,271,272,297,298,299,300,301,302,303,304,328,329,330,331,332,333,334,335,360,361,362,363,364,365,366,367,393,394,395,396,397,398,399,400,401,427,428,429,430,431,432,433,459,460,461,462,463,464,465,466,491,492,493,494,495,496,497,498,499,524,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,565,588,589,590,591,592,593,594,595,596,597,621,622,623,624,625,626,627,628,629,654,655,656,657,658,659,660,661,686,687,688,689,690,691,692,719,720,721,722,723,724},
  /* Template 32 */
  {238,239,269,270,271,297,298,299,300,301,302,303,329,330,331,332,333,334,335,361,362,363,364,365,366,367,394,395,396,397,398,399,400,427,428,429,430,431,432,433,459,460,461,462,463,464,465,466,492,493,494,495,496,497,498,499,524,525,526,527,528,529,530,531,556,557,558,559,560,561,562,563,564,565,588,589,590,591,592,593,594,595,596,597,621,622,623,624,625,626,627,628,629,654,655,656,657,658,659,660,661,686,687,688,689,690,691,692,719,720,721,722,723,753},
  /* Template 33 */
  {269,270,297,298,299,300,301,302,303,329,330,331,332,333,334,335,362,363,364,365,366,367,394,395,396,397,398,399,400,401,402,427,428,429,430,431,432,433,434,459,460,461,462,463,464,465,466,492,493,494,495,496,497,498,524,525,526,527,528,529,530,531,556,557,558,559,560,561,562,563,564,588,589,590,591,592,593,594,595,596,597,598,621,622,623,624,625,626,627,628,629,630,653,654,655,656,657,658,659,660,661,662,686,687,688,689,690,691,692,718,719,720,721,722,723,751,752,753,754},
  /* Template 34 */
  {267,268,269,270,298,299,300,301,302,330,331,332,333,334,335,363,364,365,366,367,395,396,397,398,399,401,428,429,430,431,432,433,434,460,461,462,463,464,465,466,492,493,494,495,496,497,498,499,524,525,526,527,528,529,530,531,532,533,556,557,558,559,560,561,562,563,564,565,588,589,590,591,592,593,594,595,596,597,620,621,622,623,624,625,626,627,628,629,652,653,654,655,656,657,658,659,660,661,662,685,686,687,688,689,690,691,692,693,718,719,720,721,722,723,752,753,754},
  /* Template 35 */
  {267,268,269,270,275,276,298,299,300,301,302,303,307,308,309,330,331,332,333,334,335,338,339,340,341,363,364,365,366,371,372,396,397,398,400,401,402,403,404,428,429,430,432,433,434,435,436,460,461,462,463,464,465,466,467,468,492,493,494,495,496,497,498,499,524,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,588,589,590,591,592,593,594,595,596,620,621,622,623,624,625,626,627,628,651,652,653,654,655,656,657,658,659,660,684,685,686,687,688,689,690,691,692,717,718,719,720,721,722,723,751,752,753,754},
  /* Template 36 */
  {243,267,268,269,270,275,276,298,299,300,301,302,303,306,307,308,331,332,333,334,335,336,338,339,340,364,365,366,368,370,371,372,373,396,397,399,400,401,402,403,404,405,428,429,430,431,432,433,434,435,436,437,460,461,462,463,464,465,466,467,468,469,492,493,494,495,496,497,498,499,500,524,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,565,587,588,589,590,591,592,593,594,595,596,619,620,621,622,623,624,625,626,627,628,651,652,653,654,655,656,657,658,659,660,683,684,685,686,687,688,689,690,691,716,717,718,719,720,721,722,723,750,751,752,753,754,783,784},
  /* Template 37 */
  {238,243,244,268,269,270,275,276,277,300,301,302,303,305,306,307,308,309,310,332,333,334,335,338,339,340,341,342,370,371,372,373,396,397,398,401,402,403,404,405,428,429,430,431,432,433,434,435,436,437,461,462,463,464,465,466,467,468,469,493,494,495,496,497,498,499,500,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,565,587,588,589,590,591,592,593,594,595,596,619,620,621,622,623,624,625,626,627,628,629,651,652,653,654,655,656,657,658,659,660,661,683,684,685,686,687,688,689,690,691,692,717,718,719,720,721,722,723,750,751,752,753,754},
  /* Template 38 */
  {275,305,306,307,308,309,338,339,340,341,370,371,372,373,401,402,403,404,405,406,431,432,433,434,435,436,437,438,462,463,464,465,466,467,468,469,494,495,496,497,498,499,500,525,526,527,528,529,530,531,532,533,555,556,557,558,559,560,561,562,563,564,565,585,586,587,588,589,590,591,592,593,594,595,596,617,618,619,620,621,622,623,624,625,626,627,628,650,651,652,653,654,655,656,657,658,659,660,684,685,686,687,688,689,690,691,717,718,719,720,721,722,751,752,753},
  /* Template 39 */
  {274,305,306,307,308,309,310,311,338,339,340,341,342,343,370,371,372,373,374,375,402,403,404,405,406,431,432,433,434,435,436,437,438,463,464,465,466,467,468,469,494,495,496,497,498,499,500,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,565,586,587,588,589,590,591,592,593,594,595,596,597,618,619,620,621,622,623,624,625,626,627,628,651,652,653,654,655,656,657,658,659,685,686,687,688,689,690,691,718,719,720,721,722,751,752},
  /* Template 40 */
  {273,274,305,306,307,308,309,338,339,340,341,342,343,370,371,372,373,374,375,402,403,404,405,406,407,431,433,434,435,436,437,438,462,463,464,465,466,467,468,469,470,494,495,496,497,498,499,500,501,502,525,526,527,528,529,530,531,532,533,554,555,556,557,558,559,560,561,562,563,564,565,586,587,588,589,590,591,592,593,594,595,596,619,620,621,622,623,624,625,626,627,628,651,652,653,654,655,656,657,658,659,660,684,685,686,687,688,689,690,691,717,718,719,720,721,722,752,753},
  /* Template 41 */
  {273,274,275,305,306,307,308,338,339,340,341,342,370,371,372,373,374,375,376,401,402,403,404,405,406,407,408,431,432,433,434,435,436,437,438,439,462,463,464,465,466,467,468,469,470,471,494,495,496,497,498,499,500,501,502,525,526,527,528,529,530,531,532,533,554,555,556,557,558,559,560,561,562,563,586,587,588,589,590,591,592,593,594,595,619,620,621,622,623,624,625,626,627,651,652,653,654,655,656,657,658,659,684,685,686,687,688,689,690,691,717,718,719,720,721,722},
  /* Template 42 */
  {273,274,275,276,305,306,307,308,338,339,340,341,370,371,372,373,374,375,400,401,402,403,404,405,406,407,431,432,433,434,435,436,437,438,439,462,463,464,465,466,467,468,469,470,471,493,494,495,496,497,498,499,500,501,502,503,523,524,525,526,527,528,529,530,531,532,533,534,554,555,556,557,558,559,560,561,562,563,587,588,589,590,591,592,593,594,595,619,620,621,622,623,624,625,626,627,651,652,653,654,655,656,657,658,659,684,685,686,687,688,689,690,717,718,719,720,721},
  /* Template 43 */
  {274,275,276,306,307,308,338,339,340,341,369,370,371,372,373,374,375,376,377,401,402,403,404,405,406,407,408,409,430,431,432,433,434,435,436,437,438,439,440,441,462,463,464,465,466,467,468,469,470,471,472,493,494,495,496,497,498,499,500,501,502,524,525,526,527,528,529,530,531,532,533,534,555,556,557,558,559,560,561,562,563,564,587,588,589,590,591,592,593,594,595,596,619,620,621,622,623,624,625,626,627,628,650,651,652,653,654,655,656,657,658,659,684,685,686,687,688,689,690,717,718,719,720,721,722,754},
  /* Template 44 */
  {275,306,307,308,338,339,340,341,370,371,372,373,374,400,401,402,403,404,405,406,407,408,409,430,431,432,433,434,435,436,437,438,439,440,441,462,463,464,465,466,467,468,469,470,471,472,492,493,494,495,496,497,498,499,500,501,502,503,524,525,526,527,528,529,530,531,532,533,534,555,556,557,558,559,560,561,562,563,564,565,587,588,589,590,591,592,593,594,595,596,597,619,620,621,622,623,624,625,626,627,628,651,652,653,654,655,656,657,658,659,684,685,686,687,688,689,718,719,720},
  /* Template 45 */
  {307,308,339,340,341,342,343,370,371,372,373,374,375,376,400,401,402,403,404,405,406,407,408,430,431,432,433,434,435,436,437,438,439,440,461,462,463,464,465,466,467,468,469,470,471,472,492,493,494,495,496,497,498,499,500,501,502,503,504,523,524,525,526,527,528,529,530,531,532,533,534,535,555,556,557,558,559,560,561,562,563,564,565,587,588,589,590,591,592,593,594,595,596,619,620,621,622,623,624,625,626,627,628,651,652,653,654,655,656,657,658,684,685,686,687,688,689,719,720},
  /* Template 46 */
  {307,308,338,339,340,341,342,343,369,370,371,372,373,374,375,399,400,401,402,403,404,405,406,407,431,432,433,434,435,436,437,438,439,461,462,463,464,465,466,467,468,469,470,471,472,491,492,493,494,495,496,497,498,499,500,501,502,503,504,523,524,525,526,527,528,529,530,531,532,533,534,535,555,556,557,558,559,560,561,562,563,564,565,566,586,587,588,589,590,591,592,593,594,595,596,597,617,618,619,620,621,622,623,624,625,626,627,628,652,653,654,655,656,657,658,684,685,686,687,688,689},
  /* Template 47 */
  {338,339,340,341,370,371,372,373,374,399,400,401,402,403,404,405,406,429,430,431,432,433,434,435,436,437,438,439,461,462,463,464,465,466,467,468,469,470,471,472,491,492,493,494,495,496,497,498,499,500,501,502,503,504,523,524,525,526,527,528,529,530,531,532,533,534,535,536,555,556,557,558,559,560,561,562,563,564,565,566,567,586,587,588,589,590,591,592,593,594,595,596,597,619,620,621,622,623,624,625,626,627,628,651,652,653,654,655,656,657,658,684,685,686,687,688,718,719},
  /* Template 48 */
  {306,307,308,338,339,340,341,367,368,369,370,371,372,373,374,398,399,400,401,402,403,404,405,406,428,429,430,431,432,433,434,435,436,437,438,439,458,459,460,461,462,463,464,465,466,467,468,469,470,471,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,523,524,525,526,527,528,529,530,531,532,533,534,535,536,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,586,587,588,589,590,591,592,593,594,595,596,597,619,620,621,622,623,624,625,626,627,652,653,654,655,656,657,685,686,687},
  /* Template 49 */
  {308,309,339,340,341,367,368,370,371,372,373,374,395,396,397,398,399,400,401,402,403,404,405,406,426,427,428,429,430,431,432,433,434,435,436,437,438,439,458,459,460,461,462,463,464,465,466,467,468,469,470,471,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,586,587,588,589,590,591,592,593,594,595,596,597,598,619,620,621,622,623,624,625,626,627,652,653,654,655,656,657,685,686},
  /* Template 50 */
  {339,340,341,342,366,367,368,369,370,371,372,373,374,396,397,398,399,400,401,402,403,404,405,406,426,427,428,429,430,431,432,433,434,435,436,437,438,439,458,459,460,461,462,463,464,465,466,467,468,469,470,471,490,491,492,493,494,495,496,497,498,499,500,501,502,503,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,586,587,588,589,590,591,592,593,594,595,596,597,598,599,619,620,621,622,623,624,625,626,653,654,655,656},
  /* Template 51 */
  {340,341,342,364,365,366,367,368,369,370,371,372,373,374,395,396,397,398,399,400,401,402,403,404,405,406,426,427,428,429,430,431,432,433,434,435,436,437,438,439,458,459,460,461,462,463,464,465,466,467,468,469,470,471,490,491,492,493,494,495,496,497,498,499,500,501,502,503,522,523,524,525,526,527,528,529,530,531,532,533,534,535,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,587,588,589,590,591,592,593,594,595,596,597,598,599,600,620,621,622,623,624,625,626,653,654},
  /* Template 52 */
  {335,336,337,338,339,340,341,366,367,368,369,370,371,372,374,395,396,397,398,399,400,401,402,403,404,405,406,407,427,428,429,430,431,432,433,434,435,436,437,438,439,458,459,460,461,462,463,464,465,466,467,468,469,470,471,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,554,555,556,557,558,559,560,561,562,563,564,565,566,567,586,587,588,589,590,591,592,593,594,595,596,597,598,599,620,621,622,623,624,625,626,627,628,653},
  /* Template 53 */
  {335,365,366,367,368,369,373,374,375,395,396,397,398,399,400,401,402,403,404,405,406,407,427,428,429,430,431,432,433,434,435,436,437,438,439,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,620,621,622,623,624,625,626,627,628,629,630,631},
  /* Template 54 */
  {364,365,366,367,368,369,395,396,397,398,399,400,401,402,403,404,405,406,407,427,428,429,430,431,432,433,434,435,436,437,438,439,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,620,621,622,623,624,625,626,627,628,629,630,631,654,655,659,686},
  /* Template 55 */
  {364,365,366,367,368,369,396,397,398,399,400,401,402,403,404,405,406,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,554,555,556,557,558,559,560,561,562,563,564,565,566,567,587,588,589,590,591,592,593,594,595,596,597,598,599,622,623,624,625,626,627,628,629,630,631,663},
  /* Template 56 */
  {300,301,332,333,364,365,366,367,368,369,370,371,394,395,396,397,398,399,400,401,402,403,404,405,406,407,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,555,556,557,558,559,560,561,562,563,564,565,566,567,568,590,591,592,593,594,595,596,597,598,599,600,626,627,628,629,630,631,632},
  /* Template 57 */
  {301,332,333,334,363,364,365,366,367,368,369,370,392,393,394,395,396,397,398,399,400,401,402,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,555,556,557,558,559,560,561,562,563,564,565,566,567,568,591,592,593,594,595,596,597,598,599,626,627,628,629,630,631,661,662,663},
  /* Template 58 */
  {332,333,334,335,364,365,366,367,368,393,394,395,396,397,398,399,400,401,402,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,523,524,525,526,527,528,529,530,531,532,533,534,535,536,556,557,558,559,560,561,562,563,564,565,566,567,568,592,593,594,595,596,597,598,599,626,627,628,629,630,631,660,661,662,663},
  /* Template 59 */
  {332,333,334,335,363,364,365,366,367,368,393,394,395,396,397,398,399,400,401,402,403,425,426,427,428,429,430,431,432,433,434,435,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,490,491,492,493,494,495,496,497,498,499,500,501,502,503,523,524,525,526,527,528,529,530,531,532,533,534,535,536,557,558,559,560,561,562,563,564,565,566,567,592,593,594,595,596,597,598,599,626,627,628,629,630,659,660,661,662},
  /* Template 60 */
  {332,333,334,335,363,364,365,366,367,368,393,394,395,396,397,398,399,400,401,402,403,425,426,427,428,429,430,431,432,433,434,435,457,458,459,460,461,462,463,464,465,466,467,468,490,491,492,493,494,495,496,497,498,499,500,501,502,503,524,525,526,527,528,529,530,531,532,533,534,535,536,558,559,560,561,562,563,564,565,566,567,592,593,594,595,596,597,598,625,626,627,628,629,630,659,660,661,692},
  /* Template 61 */
  {300,301,302,331,332,333,334,335,336,362,363,364,365,366,367,368,369,392,393,394,395,396,397,398,399,400,401,425,426,427,428,429,430,431,432,433,434,435,458,459,460,461,462,463,464,465,466,467,468,491,492,493,494,495,496,497,498,499,500,501,502,503,524,525,526,527,528,529,530,531,532,533,534,535,558,559,560,561,562,563,564,565,566,567,591,592,593,594,595,596,597,598,625,626,627,628,629,658,659,660,661,692},
  /* Template 62 */
  {300,301,302,303,331,332,333,334,335,336,362,363,364,365,366,367,368,369,394,395,396,397,398,399,400,401,426,427,428,429,430,431,432,433,434,435,436,458,459,460,461,462,463,464,465,466,467,468,491,492,493,494,495,496,497,498,499,500,501,524,525,526,527,528,529,530,531,532,533,534,535,558,559,560,561,562,563,564,565,566,567,591,592,593,594,595,596,597,599,624,625,626,627,628,629,658,659,660,690,691},
  /* Template 63 */
  {300,301,302,303,304,329,330,331,332,333,334,335,336,337,361,362,363,364,365,366,367,368,369,370,371,393,394,395,396,397,398,399,400,401,402,403,404,426,427,428,429,430,431,432,433,434,435,436,459,460,461,462,463,464,465,466,467,468,492,493,494,495,496,497,498,499,500,526,527,528,529,530,531,532,533,534,558,559,560,561,562,563,564,565,591,592,593,594,595,596,597,624,625,626,627,628,629,657,658,688},
  /* Template 64 */
  {299,300,301,302,303,304,330,331,332,333,334,335,336,337,362,363,364,365,366,367,368,369,370,394,395,396,397,398,399,400,401,402,427,428,429,430,431,432,433,434,460,461,462,463,464,465,466,467,468,493,494,495,496,497,498,499,500,526,527,528,529,530,531,532,533,558,559,560,561,562,563,564,565,591,592,593,594,595,596,597,624,625,626,627,628,629,657,658},
  /* Template 65 */
  {299,300,301,302,303,304,305,330,331,332,333,334,335,336,337,362,363,364,365,366,367,368,369,370,395,396,397,398,399,400,401,402,427,428,429,430,431,432,433,434,460,461,462,463,464,465,466,467,468,493,494,495,496,497,498,499,500,526,527,528,529,530,531,532,558,559,560,561,562,563,564,565,591,592,593,594,595,596,597,624,625,626,627,628,656,657,689},
  /* Template 66 */
  {267,268,269,298,299,300,301,302,303,304,305,306,307,330,331,332,333,334,335,336,337,338,339,362,363,364,365,366,367,368,369,370,371,394,395,396,397,398,399,400,401,402,403,427,428,429,430,431,432,433,434,435,436,460,461,462,463,464,465,466,467,468,493,494,495,496,497,498,499,500,525,526,527,528,529,530,531,532,558,559,560,561,562,563,564,590,591,592,593,594,595,596,597,623,624,625,626,627,628,655,656,657,658,659,687,688,689},
  /* Template 67 */
  {267,268,269,270,299,300,301,302,303,304,331,332,333,334,335,336,337,338,339,363,364,365,366,367,368,369,370,371,395,396,397,398,399,400,401,402,403,428,429,430,431,432,433,434,435,460,461,462,463,464,465,466,467,468,492,493,494,495,496,497,498,499,500,525,526,527,528,529,530,531,532,557,558,559,560,561,562,563,564,589,590,591,592,593,594,595,596,597,622,623,624,625,626,627,628,655,656,657,658,687,688},
  /* Template 68 */
  {267,268,269,270,299,300,301,302,303,304,305,306,331,332,333,334,335,336,337,338,362,363,364,365,366,367,368,369,370,394,395,396,397,398,399,400,401,402,403,427,428,429,430,431,432,433,434,435,459,460,461,462,463,464,465,466,467,492,493,494,495,496,497,498,499,500,524,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,589,590,591,592,593,594,595,596,622,623,624,625,626,627,628,654,655,656,657,658,686,687},
  /* Template 69 */
  {236,237,267,268,269,270,271,299,300,301,302,303,304,305,306,331,332,333,334,335,336,337,338,363,364,365,366,367,368,369,370,371,395,396,397,398,399,400,401,402,403,428,429,430,431,432,433,434,435,460,461,462,463,464,465,466,467,491,492,493,494,495,496,497,498,499,500,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,589,590,591,592,593,594,595,596,622,623,624,625,626,627,628,653,654,655,656,657,658,659,685,686,687},
  /* Template 70 */
  {268,269,270,271,272,300,301,302,303,304,305,306,332,333,334,335,336,337,338,339,363,364,365,366,367,368,369,370,371,395,396,397,398,399,400,401,402,403,428,429,430,431,432,433,434,435,460,461,462,463,464,465,466,467,492,493,494,495,496,497,498,499,524,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,588,589,590,591,592,593,594,595,596,621,622,623,624,625,626,627,628,652,653,654,655,656,657,658,659,660,685,686,687,688},
  /* Template 71 */
  {269,270,271,272,300,301,302,303,304,305,306,307,332,333,334,335,336,337,338,339,364,365,366,367,368,369,370,371,372,373,396,397,398,399,400,401,402,403,404,428,429,430,431,432,433,434,435,460,461,462,463,464,465,466,467,491,492,493,494,495,496,497,498,499,500,524,525,526,527,528,529,530,531,532,556,557,558,559,560,561,562,563,564,588,589,590,591,592,593,594,595,620,621,622,623,624,625,626,627,651,652,653,654,655,656,657,658,659,684,685,686,687,688,689,690,691}
};

static int SurroundIndex[][128] = 
{
  /* Template 0 */
  {236,237,238,239,240,241,242,267,268,274,275,276,299,308,329,330,331,340,341,361,373,393,394,405,426,437,458,469,490,501,522,533,554,565,586,596,597,618,628,650,660,682,692,714,715,716,717,722,723,724,749,750,752,753,754,782,783,784},
  /* Template 1 */
  {237,238,239,240,241,242,243,269,275,276,299,300,301,308,330,331,340,361,362,372,393,404,405,425,426,437,458,469,490,501,522,532,533,554,564,586,596,618,628,649,650,660,681,692,713,724,745,746,747,748,749,750,751,752,753,754,755,756},
  /* Template 2 */
  {237,238,239,240,241,242,243,244,268,269,276,277,300,309,331,332,341,362,363,373,394,405,426,437,458,468,469,490,500,521,522,532,553,564,585,596,617,627,628,649,659,681,691,713,714,715,716,717,723,749,750,751,752,755,784,785,786,787},
  /* Template 3 */
  {238,239,240,241,242,243,269,270,275,276,277,300,301,309,332,341,364,373,395,396,405,427,437,459,469,490,491,500,501,521,522,531,532,553,563,585,595,617,627,649,659,681,691,713,714,715,716,717,723,749,750,751,754,755,783,784,785,786},
  /* Template 4 */
  {240,241,242,243,244,269,270,271,272,276,277,278,300,301,310,332,342,363,364,374,395,406,427,438,459,469,470,491,501,521,522,523,532,533,552,553,564,584,595,596,616,627,648,659,680,681,682,691,714,715,716,717,723,749,750,751,754,755,783,784,785,786},
  /* Template 5 */
  {207,208,209,210,211,238,239,243,269,270,275,276,277,301,309,310,332,333,342,363,364,374,395,406,407,427,439,459,470,471,490,491,501,502,520,521,522,532,533,552,564,584,595,596,616,627,648,659,680,681,682,690,691,714,715,716,722,748,749,750,754,782,783,784,785,786},
  /* Template 6 */
  {240,241,242,243,269,270,271,272,275,276,300,301,308,331,332,340,341,342,363,374,375,395,407,426,427,439,458,471,489,490,502,503,520,521,532,533,534,550,551,552,564,582,595,596,614,627,646,658,659,678,679,680,681,682,689,690,714,715,721,747,748,749,753,781,784,785,813,814,815,816},
  /* Template 7 */
  {241,242,243,269,270,271,272,273,275,276,299,300,301,308,309,331,341,342,363,374,394,395,406,407,426,439,440,458,472,488,489,490,503,504,518,519,520,533,534,535,549,550,564,565,581,595,596,613,614,627,646,647,648,649,658,659,681,682,689,690,714,715,720,721,747,748,752,780,783,784,812,813,814,815},
  /* Template 8 */
  {270,271,272,273,274,275,301,302,307,308,332,333,340,341,342,363,364,374,394,395,406,426,438,457,458,470,471,486,487,488,489,503,518,534,535,550,565,566,582,596,597,614,627,628,646,647,648,649,657,658,659,681,682,689,714,720,721,746,747,748,751,752,780,781,782,783},
  /* Template 9 */
  {238,239,240,241,270,273,274,275,301,302,307,308,332,333,340,364,372,373,374,394,395,396,406,407,426,439,440,457,458,472,487,488,489,504,518,519,534,535,536,550,565,566,582,596,597,614,615,627,628,647,648,657,658,659,680,681,689,713,714,719,720,721,746,747,748,750,751,780,781,782},
  /* Template 10 */
  {271,272,273,274,275,276,301,302,303,308,332,333,340,364,372,373,394,395,396,405,406,407,425,426,439,440,455,456,457,472,487,504,518,519,535,536,550,567,582,596,597,598,599,614,615,627,628,647,648,657,658,659,680,681,688,689,713,719,720,745,746,750,751,778,779,780,781,782},
  /* Template 11 */
  {271,272,273,274,275,301,302,303,307,308,333,340,364,365,372,373,395,396,405,406,425,426,427,438,439,454,455,456,457,471,486,503,518,535,550,566,567,582,583,597,598,615,626,627,628,629,647,648,657,658,680,681,687,688,689,713,718,719,745,746,749,750,778,779,780,781},
  /* Template 12 */
  {273,274,275,302,303,304,305,307,308,333,334,340,364,365,372,373,396,405,406,407,424,425,426,427,428,439,454,455,456,471,486,503,518,535,550,551,567,583,597,598,599,615,616,627,628,629,648,649,657,658,659,681,687,688,689,713,718,719,745,746,747,748,749,750},
  /* Template 13 */
  {301,302,303,304,305,306,307,308,309,332,333,341,364,373,390,391,392,393,394,395,396,405,406,407,422,439,440,454,472,486,504,518,536,550,567,568,582,583,598,599,615,616,627,628,629,630,648,657,658,659,680,681,687,688,689,713,716,717,718,719,745,746,747,748},
  /* Template 14 */
  {301,302,303,304,305,306,307,308,332,333,340,341,358,359,360,361,362,363,364,373,389,390,405,406,407,408,421,440,453,472,485,486,503,504,518,519,535,551,567,583,598,599,615,616,628,629,630,648,657,658,659,660,680,687,688,689,712,713,714,715,716,717,718,719},
  /* Template 15 */
  {301,302,303,304,305,306,307,308,332,333,340,341,358,359,360,361,362,363,364,373,390,405,406,407,408,422,440,454,472,486,504,518,519,535,536,551,567,583,599,615,616,630,631,648,657,658,659,660,661,662,680,686,687,688,689,712,713,715,716,717,718,745,746,747},
  /* Template 16 */
  {301,302,303,304,305,306,307,308,327,328,329,330,331,332,333,340,341,358,359,373,390,405,406,407,422,439,440,454,472,486,504,518,536,550,551,568,583,599,600,615,630,631,647,659,660,661,662,679,684,685,686,687,688,689,690,691,711,712,713,714,715,716},
  /* Template 17 */
  {300,301,302,303,304,305,306,307,308,326,327,328,329,330,331,332,340,341,358,373,374,390,406,407,422,439,440,454,472,486,487,504,519,536,551,567,568,583,599,615,631,647,661,662,663,679,683,684,685,686,687,688,689,690,691,692,693,711,712,713,714,715},
  /* Template 18 */
  {327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,359,374,391,406,407,423,439,440,455,472,487,504,519,536,551,568,583,600,615,632,647,662,663,664,679,680,681,682,683,684,686,687,688,689,690,691,692,693,694,716,717,718},
  /* Template 19 */
  {296,297,298,299,300,301,302,327,328,334,335,336,337,338,339,340,341,359,373,374,391,406,407,423,439,440,455,472,487,504,519,536,551,568,583,600,615,632,647,648,662,663,664,680,681,682,683,684,685,686,688,689,690,691,692,693,694,718,719,720},
  /* Template 20 */
  {296,297,298,299,300,301,302,303,328,335,336,337,338,339,340,360,372,392,404,405,406,407,423,424,439,455,471,472,487,504,505,519,537,550,551,569,582,601,614,631,632,633,646,647,648,649,650,651,652,653,662,663,685,686,687,688,689,690,691,693,694,723,724,725},
  /* Template 21 */
  {234,235,236,265,266,268,269,270,271,296,297,303,328,335,336,337,338,360,370,371,372,373,374,391,392,406,423,438,439,440,455,472,473,487,505,518,519,536,537,550,568,582,583,600,615,616,617,618,619,632,651,652,653,654,663,664,686,687,688,689,693,694,695,721,722,723,724,725},
  /* Template 22 */
  {233,234,235,264,265,267,268,269,270,271,272,296,304,328,336,337,338,339,359,360,371,372,373,391,405,406,407,423,439,455,471,486,487,503,518,535,550,567,582,583,599,615,616,617,618,619,631,651,652,653,663,685,686,687,688,689,693,694,695,721,722,723,724,725},
  /* Template 23 */
  {201,202,203,232,233,235,236,264,268,269,270,271,296,303,304,328,336,337,338,339,360,371,372,390,391,392,404,405,422,437,438,439,454,471,486,503,518,535,536,550,568,582,583,584,585,600,617,618,619,620,632,652,653,654,663,664,686,687,688,694,695,720,721,722,724,725,726,754,755,756},
  /* Template 24 */
  {234,235,236,266,268,269,270,296,297,298,302,303,304,328,336,337,360,369,370,391,392,402,403,404,423,436,437,438,454,455,470,471,486,503,518,535,550,551,567,568,569,583,584,585,586,587,601,619,620,633,652,653,654,663,664,665,686,687,688,694,695,720,721,725,726,753,754,755,756,757},
  /* Template 25 */
  {236,237,238,266,267,268,270,271,298,303,304,329,330,336,337,359,360,361,369,370,391,402,403,404,422,423,436,437,454,469,470,471,486,503,518,519,535,551,552,553,554,567,568,586,587,600,619,620,621,631,632,653,654,663,686,687,688,694,695,720,721,724,725,726,753,754,755,756},
  /* Template 26 */
  {204,205,206,207,236,239,265,266,267,268,271,297,303,304,328,329,336,359,360,368,369,390,391,401,402,403,422,435,436,437,454,469,470,471,486,487,503,504,519,520,536,552,553,567,568,585,586,587,599,619,620,631,652,653,654,663,686,687,694,695,719,720,721,724,725,726,753,754,755,756},
  /* Template 27 */
  {205,206,207,235,236,237,239,265,266,267,271,272,296,297,304,326,327,328,336,337,358,369,370,390,402,403,422,435,436,454,455,468,469,487,501,502,503,519,520,521,535,553,567,585,586,587,588,599,620,631,652,653,663,685,686,687,695,719,720,725,726,727,752,753,754,755,756,757},
  /* Template 28 */
  {233,234,235,236,237,238,239,240,265,272,296,297,304,328,336,337,358,359,360,369,370,390,402,403,422,435,436,437,454,469,470,471,472,486,487,488,489,504,521,536,553,554,555,568,587,588,600,620,631,632,652,653,663,685,686,695,718,719,725,726,727,751,752,753,754,755,756,757},
  /* Template 29 */
  {236,237,238,239,240,264,265,266,267,268,272,296,304,327,328,336,337,359,369,391,401,402,403,423,435,436,455,456,457,468,489,490,500,501,502,503,504,522,536,554,555,568,587,588,600,620,631,632,652,653,663,685,686,694,695,718,719,725,726,751,752,753,754,755,756,757},
  /* Template 30 */
  {204,205,206,236,238,239,240,264,265,266,267,268,272,273,295,296,305,327,337,359,369,391,392,401,424,433,434,435,436,456,457,458,468,469,490,501,502,522,523,534,535,555,567,587,588,599,620,631,652,653,662,663,685,686,694,718,719,725,726,751,752,753,754,755,756,757},
  /* Template 31 */
  {173,174,175,205,207,208,236,237,240,241,264,265,266,267,268,273,295,296,305,327,337,359,369,370,391,392,402,424,425,426,434,435,458,467,468,490,500,501,522,523,533,534,555,566,587,598,619,620,630,652,653,662,685,693,694,717,718,725,750,751,752,753,754,755,756,757},
  /* Template 32 */
  {205,206,207,208,236,237,240,264,265,266,267,268,272,296,304,328,336,360,368,369,392,393,401,402,425,426,434,435,458,467,468,490,491,500,523,532,533,534,555,566,587,598,619,620,630,652,653,662,685,693,694,717,718,724,725,750,751,752,754,755,756,784,785,786},
  /* Template 33 */
  {236,237,238,239,264,265,266,267,268,271,272,296,304,328,336,360,361,368,369,370,371,393,403,425,426,435,458,467,490,491,499,500,523,532,533,555,565,566,567,587,599,619,620,631,652,663,684,685,693,694,695,717,724,725,749,750,755,756,782,783,784,785,786,787},
  /* Template 34 */
  {234,235,236,237,238,239,265,266,271,297,303,304,329,336,361,362,368,369,370,394,402,403,426,427,435,459,467,468,491,500,501,502,523,534,555,566,587,598,619,630,631,651,663,683,684,694,695,716,717,724,725,726,749,750,751,755,756,783,784,785,786,787},
  /* Template 35 */
  {234,235,236,237,238,239,240,241,242,243,244,245,265,266,277,278,297,310,329,342,361,362,373,374,394,395,405,427,437,459,469,491,501,523,533,555,565,587,597,618,619,629,650,661,682,683,693,715,716,724,725,748,749,750,755,756,782,783,784,785,786,787},
  /* Template 36 */
  {210,211,212,234,235,236,237,238,239,240,241,242,244,245,265,266,277,297,309,329,330,341,342,362,363,374,395,406,427,438,459,470,491,502,523,534,554,555,566,586,597,598,618,629,650,661,682,692,693,714,715,724,747,748,749,755,756,781,782,785,786,787,814,815,816,817},
  /* Template 37 */
  {205,206,207,208,209,210,211,212,213,235,236,237,245,246,267,278,279,299,311,331,343,363,374,375,395,406,427,438,459,470,491,502,523,534,554,555,566,586,598,618,630,650,662,682,693,694,714,715,716,724,725,748,749,755,756,781,782,783,784,785,786,787},
  /* Template 38 */
  {242,243,244,272,273,274,276,277,278,304,310,336,342,368,374,375,398,399,400,407,429,430,439,461,470,471,492,493,502,522,523,524,534,552,553,554,566,584,597,598,616,629,648,649,661,681,682,683,692,693,715,716,723,724,748,749,750,754,755,782,783,784,785,786},
  /* Template 39 */
  {241,242,243,272,273,275,276,277,278,279,280,304,312,336,344,368,376,398,399,400,407,408,430,439,461,462,470,471,492,493,502,523,524,534,553,554,555,566,585,598,617,629,630,649,650,660,661,682,683,684,692,716,717,723,724,749,750,753,754,755,782,783,784,785},
  /* Template 40 */
  {240,241,242,243,272,275,276,277,278,304,310,311,312,336,344,368,376,398,399,400,408,429,430,439,440,461,471,492,493,503,521,522,523,524,534,535,553,566,585,597,598,617,618,629,650,661,682,683,692,693,715,716,723,724,748,749,750,751,754,755,783,784,785,786},
  /* Template 41 */
  {240,241,242,243,244,272,276,277,304,309,310,311,336,343,344,345,368,377,398,399,400,409,429,430,440,441,461,472,492,493,503,504,521,522,523,524,534,535,553,564,565,566,585,596,617,618,628,650,660,682,683,692,715,716,723,724,748,749,750,751,752,753,754,755},
  /* Template 42 */
  {240,241,242,243,244,245,272,277,304,309,310,336,342,343,344,367,368,376,398,399,408,429,430,440,460,461,472,490,491,492,504,521,522,535,536,553,564,565,566,567,585,586,596,618,628,650,660,682,683,691,692,715,716,722,723,748,749,750,751,752,753,754},
  /* Template 43 */
  {241,242,243,244,245,273,277,305,309,310,336,337,342,343,344,345,346,368,378,397,398,399,400,410,429,442,460,461,473,474,491,492,503,504,505,522,523,535,554,565,566,567,586,597,617,618,629,649,660,661,681,682,683,691,692,715,716,723,748,749,750,751,752,753,755,785,786,787},
  /* Template 44 */
  {242,243,244,273,274,276,277,305,309,310,337,342,343,367,368,369,375,376,377,378,397,398,399,410,429,442,459,460,461,473,474,491,504,505,522,523,535,536,554,566,567,586,598,618,629,630,650,660,661,682,683,690,691,692,715,716,717,721,722,749,750,751,752,753},
  /* Template 45 */
  {274,275,276,277,306,309,310,311,312,337,338,344,345,367,368,369,377,397,398,399,409,428,429,441,459,460,473,490,491,505,522,536,537,554,566,567,568,586,597,598,618,629,650,659,660,661,682,683,690,691,715,716,717,718,721,722,750,751,752,753},
  /* Template 46 */
  {274,275,276,277,305,306,309,310,311,312,336,337,344,366,367,368,376,398,408,428,429,430,440,441,458,459,460,473,490,505,522,536,537,553,554,567,568,584,585,598,599,616,629,630,648,649,650,651,659,660,661,683,690,691,715,716,717,718,719,720,721,722},
  /* Template 47 */
  {305,306,307,308,309,310,337,342,343,366,367,368,369,375,396,397,398,407,408,428,440,441,458,459,460,473,490,505,522,537,553,554,568,569,585,598,599,600,617,618,629,630,650,659,660,661,682,683,689,690,691,715,716,717,720,721,749,750,751,752},
  /* Template 48 */
  {273,274,275,276,277,305,309,310,334,335,336,337,342,343,365,366,375,395,396,397,407,408,425,426,427,440,457,472,473,489,505,521,537,553,569,585,598,599,600,601,617,618,628,629,630,650,651,658,659,660,683,684,688,689,690,716,717,718,719,720},
  /* Template 49 */
  {275,276,277,278,306,307,310,334,335,336,337,338,342,343,362,363,364,365,366,375,393,394,407,408,425,440,457,472,473,489,505,521,537,553,569,585,599,600,601,617,618,628,629,630,631,650,651,658,659,660,683,684,687,688,689,690,716,717,718,719},
  /* Template 50 */
  {306,307,308,309,310,311,333,334,335,336,337,338,343,363,364,365,375,393,394,395,407,408,425,440,457,472,489,504,505,521,537,553,569,585,600,601,617,618,627,628,629,630,631,632,650,651,652,657,658,659,684,685,686,687,688,689},
  /* Template 51 */
  {307,308,309,310,311,331,332,333,334,335,336,337,338,339,343,362,363,375,393,394,407,408,425,440,457,472,489,504,521,536,537,553,569,585,586,601,618,619,627,628,629,630,631,632,633,651,652,655,656,657,658,659,684,685,686,687},
  /* Template 52 */
  {302,303,304,305,306,307,308,309,310,333,334,342,343,362,363,364,365,375,376,394,408,425,426,440,455,456,457,472,487,504,519,536,551,552,553,568,585,600,617,618,619,629,630,631,632,651,652,654,655,656,657,658,659,660,661,684,685,686},
  /* Template 53 */
  {302,303,304,332,333,334,336,337,338,339,340,341,342,343,344,362,363,364,376,394,408,424,425,426,440,456,472,487,488,504,519,536,551,552,568,584,600,616,617,618,619,632,651,652,653,654,655,656,657,658,659,660,661,662,663,664},
  /* Template 54 */
  {331,332,333,334,335,336,337,338,362,363,370,371,372,373,374,375,376,394,408,423,424,425,426,440,455,472,487,504,519,536,551,568,583,600,615,616,617,618,619,632,651,652,653,660,661,662,663,664,685,687,688,689,690,691,692,717,718,719},
  /* Template 55 */
  {331,332,333,334,335,336,337,338,363,370,371,372,373,374,375,391,392,393,394,395,407,408,423,440,455,472,487,504,519,536,551,552,553,568,585,586,600,618,619,620,621,632,653,654,655,656,657,658,659,660,661,662,664,694,695,696},
  /* Template 56 */
  {267,268,269,270,299,302,331,334,335,336,337,338,339,340,361,362,363,372,373,374,375,376,391,392,393,408,409,410,423,442,455,473,474,487,505,519,537,551,552,553,554,569,586,587,588,589,601,621,622,623,624,625,633,657,658,659,660,661,662,663,664,665},
  /* Template 57 */
  {268,269,270,299,300,302,303,330,331,335,336,337,338,339,359,360,361,362,371,391,403,404,405,406,407,408,423,440,441,455,473,487,505,519,520,521,537,553,554,569,586,587,588,589,590,600,601,622,623,624,625,632,657,658,659,660,664,692,693,694,695,696},
  /* Template 58 */
  {299,300,301,302,303,304,331,336,337,360,361,362,363,369,370,371,391,392,403,404,405,406,407,408,423,440,455,472,473,474,487,488,506,520,521,522,537,538,554,555,569,587,588,589,590,591,600,601,623,624,625,632,657,658,659,664,691,692,693,694,695,696},
  /* Template 59 */
  {299,300,301,302,303,304,330,331,336,337,360,361,362,369,370,371,372,392,404,424,436,437,438,439,440,456,472,488,489,504,505,521,522,537,554,555,556,568,569,588,589,590,591,600,623,624,625,631,632,657,658,663,690,691,692,693,694,695},
  /* Template 60 */
  {299,300,301,302,303,304,330,331,336,337,360,361,362,369,370,371,372,392,404,424,436,437,456,469,470,471,472,488,489,504,505,521,522,523,537,555,556,557,568,569,589,590,591,599,600,623,624,631,656,657,658,662,663,690,691,693,694,723,724,725},
  /* Template 61 */
  {267,268,269,270,271,298,299,303,304,305,329,330,337,338,359,360,361,370,391,402,403,404,423,424,436,437,456,457,469,470,471,472,489,490,504,522,523,536,555,556,557,568,589,590,599,600,622,623,624,630,631,656,657,662,689,690,691,693,694,723,724,725},
  /* Template 62 */
  {267,268,269,270,271,272,298,299,304,305,329,330,337,338,361,370,393,402,403,404,405,425,437,457,469,470,489,490,502,503,504,522,523,536,555,556,557,568,589,590,600,622,623,630,631,632,655,656,657,661,662,689,692,693,721,722,723,724},
  /* Template 63 */
  {267,268,269,270,271,272,273,296,297,298,299,305,306,328,338,339,340,360,372,373,392,405,424,425,437,457,458,469,490,491,501,502,503,523,524,525,535,557,566,567,589,590,598,622,623,630,655,659,660,661,662,687,689,690,691,719,720,721},
  /* Template 64 */
  {266,267,268,269,270,271,272,273,297,298,305,306,329,338,339,361,371,393,403,425,426,435,436,437,458,459,469,491,492,501,502,524,525,534,557,566,589,590,598,622,623,630,655,656,659,660,661,662,688,689,690,691},
  /* Template 65 */
  {266,267,268,269,270,271,272,273,274,297,298,306,329,338,339,361,371,393,394,403,426,435,436,437,458,459,469,491,492,501,524,525,533,534,557,566,589,590,598,622,623,629,630,655,658,659,660,661,687,688,690,720,721,722},
  /* Template 66 */
  {234,235,236,237,238,265,266,270,271,272,273,274,275,276,297,308,329,340,361,372,393,404,405,425,426,437,458,459,469,491,492,501,524,533,556,557,565,566,589,598,621,622,629,630,654,660,661,686,690,691,692,718,719,720,721,722},
  /* Template 67 */
  {234,235,236,237,238,239,266,271,272,273,298,305,306,307,308,330,340,362,372,394,404,426,427,436,437,459,469,491,501,523,524,533,556,565,566,588,598,620,621,629,630,653,654,659,660,661,686,689,690,691,718,719,720,721},
  /* Template 68 */
  {234,235,236,237,238,239,266,271,272,273,274,275,298,307,329,330,339,361,371,372,393,404,425,426,436,458,468,469,490,491,501,523,533,555,565,587,588,597,620,621,629,653,659,660,661,685,688,689,690,691,717,718,719,720},
  /* Template 69 */
  {203,204,205,206,234,235,238,239,240,266,272,273,274,275,298,307,330,339,340,362,372,394,404,426,436,458,468,469,490,501,522,523,533,555,565,587,588,597,620,629,652,660,661,684,688,689,690,691,692,716,717,718,719,720},
  /* Template 70 */
  {235,236,237,238,239,240,241,267,273,274,275,299,307,308,330,331,340,362,372,394,404,426,427,436,459,468,491,500,501,523,533,555,565,587,597,619,629,651,661,683,684,689,690,691,692,693,716,717,718,719,720,721},
  /* Template 71 */
  {236,237,238,239,240,241,267,268,273,274,275,276,299,308,331,340,341,342,363,374,395,405,406,427,437,458,459,469,490,501,522,533,554,565,586,596,597,618,628,650,660,682,683,692,715,716,717,718,719,720,721,722,723,724}
};
